﻿using System;
using System.Collections.Generic;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities
{

	/// <summary>
	/// Represents a product review for a single product by a single customer.
	/// </summary>
	public class ProductReview
	{

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="ProductReview"/> class.
		/// </summary>
		public ProductReview()
		{
			AttributeValues = new Dictionary<Guid, ProductReviewAttributeValue>();
            Images = new Dictionary<Guid, ProductReviewImage>();
		}

		#endregion // Constructors

		#region Properties

		/// <summary>
		/// Gets or sets the product feedback identifier of the product feedback that the 
		/// review is a part of.
		/// </summary>
		/// <value>A product feedback identifier <see cref="Guid"/>.</value>
		public Guid FeedbackId { get; set; }

		/// <summary>
		/// Gets or sets the title of the review.
		/// </summary>
		public string Title { get; set; }

		/// <summary>
		/// Gets or sets the body of the review.
		/// </summary>
		public string Body { get; set; }

		/// <summary>
		/// Gets or sets the total number of third party reviews of the review.
		/// </summary>
		public int TotalThirdPartyReviews { get; set; }

		/// <summary>
		/// Gets or sets the number of third party reviews of the review that were positive.
		/// </summary>
		public int PositiveThirdPartyReviews { get; set; }

        /// <summary>
        /// Gets the attribute values of the review.
        /// </summary>
        /// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductReviewAttributeValue"/>
        /// keyed by attribute identifier <see cref="Guid"/>.</value>
        public Dictionary<Guid, ProductReviewAttributeValue> AttributeValues { get; private set; }

        /// <summary>
        /// Gets the images associated with the review.
        /// </summary>
        /// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductReviewAttributeValue"/>
        /// keyed by image identifier <see cref="Guid"/>.</value>
        public Dictionary<Guid, ProductReviewImage> Images { get; private set; }

        /// <summary>
        /// Gets or sets the video associated with the review.
        /// </summary>
        public ProductReviewVideo Video { get; set; }

		#endregion // Properties

	}

}
